projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2339e98
)
util.c: add case_ignore_strncmp
author
robertl
<robertl>
Sun, 23 Jan 2005 04:19:50 +0000
(
04:19
+0000)
committer
robertl
<robertl>
Sun, 23 Jan 2005 04:19:50 +0000
(
04:19
+0000)
util.c
patch
|
blob
|
history
diff --git
a/util.c
b/util.c
index 69f0d9370b07a14293c80c3499d669d707e85fa7..165453a3ef1868fea196eb71fed5916cd71de394 100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-326,6
+326,20
@@
case_ignore_strcmp(const char *s1, const char *s2)
}
+int
+case_ignore_strncmp(const char *s1, const char *s2, int n)
+{
+ int rv = 0;
+
+ while (n && ((rv = toupper(*s1) - toupper(*s2)) == 0)
+ && *s1) {
+ s1++;
+ s2++;
+ n--;
+ }
+ return rv;
+}
+
void
printposn(const double c, int is_lat)
{